package qldc.pm.tienan.model.impl;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.DateUtil;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.util.PortalUtil;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import qldc.pm.tienan.model.TienAn;
import qldc.pm.tienan.model.TienAnModel;

import java.io.Serializable;

import java.sql.Types;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * The base model implementation for the TienAn service. Represents a row in the &quot;TA_TienAn&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link qldc.pm.tienan.model.TienAnModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link TienAnImpl}.
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see TienAnImpl
 * @see qldc.pm.tienan.model.TienAn
 * @see qldc.pm.tienan.model.TienAnModel
 * @generated
 */
public class TienAnModelImpl extends BaseModelImpl<TienAn>
    implements TienAnModel {
    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this class directly. All methods that expect a tien an model instance should use the {@link qldc.pm.tienan.model.TienAn} interface instead.
     */
    public static final String TABLE_NAME = "TA_TienAn";
    public static final Object[][] TABLE_COLUMNS = {
            { "tienAnId", Types.BIGINT },
            { "userId", Types.BIGINT },
            { "userName", Types.VARCHAR },
            { "createDate", Types.TIMESTAMP },
            { "modifiedDate", Types.TIMESTAMP },
            { "doiTuongTienAnId", Types.BIGINT },
            { "toaAnXuPhat", Types.VARCHAR },
            { "ngayToaAn", Types.TIMESTAMP },
            { "toiDanh", Types.VARCHAR },
            { "ngayPhamToi", Types.TIMESTAMP },
            { "xoaAnTich", Types.BOOLEAN },
            { "chuThich", Types.VARCHAR },
            { "hinhPhatChinh", Types.VARCHAR },
            { "hinhPhatBoSung", Types.VARCHAR },
            { "nghiaVuDanSu", Types.VARCHAR },
            { "anPhi", Types.VARCHAR },
            { "banAnSo", Types.VARCHAR },
            { "moTaTienAn", Types.VARCHAR }
        };
    public static final String TABLE_SQL_CREATE = "create table TA_TienAn (tienAnId LONG not null primary key,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,doiTuongTienAnId LONG,toaAnXuPhat VARCHAR(75) null,ngayToaAn DATE null,toiDanh VARCHAR(75) null,ngayPhamToi DATE null,xoaAnTich BOOLEAN,chuThich VARCHAR(75) null,hinhPhatChinh VARCHAR(75) null,hinhPhatBoSung VARCHAR(75) null,nghiaVuDanSu VARCHAR(75) null,anPhi VARCHAR(75) null,banAnSo VARCHAR(75) null,moTaTienAn VARCHAR(75) null)";
    public static final String TABLE_SQL_DROP = "drop table TA_TienAn";
    public static final String ORDER_BY_JPQL = " ORDER BY tienAn.ngayToaAn DESC";
    public static final String ORDER_BY_SQL = " ORDER BY TA_TienAn.ngayToaAn DESC";
    public static final String DATA_SOURCE = "liferayDataSource";
    public static final String SESSION_FACTORY = "liferaySessionFactory";
    public static final String TX_MANAGER = "liferayTransactionManager";
    public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.entity.cache.enabled.qldc.pm.tienan.model.TienAn"),
            true);
    public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.finder.cache.enabled.qldc.pm.tienan.model.TienAn"),
            true);
    public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.column.bitmask.enabled.qldc.pm.tienan.model.TienAn"),
            true);
    public static long DOITUONGTIENANID_COLUMN_BITMASK = 1L;
    public static long NGAYTOAAN_COLUMN_BITMASK = 2L;
    public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
                "lock.expiration.time.qldc.pm.tienan.model.TienAn"));
    private static ClassLoader _classLoader = TienAn.class.getClassLoader();
    private static Class<?>[] _escapedModelInterfaces = new Class[] { TienAn.class };
    private long _tienAnId;
    private long _userId;
    private String _userUuid;
    private String _userName;
    private Date _createDate;
    private Date _modifiedDate;
    private long _doiTuongTienAnId;
    private long _originalDoiTuongTienAnId;
    private boolean _setOriginalDoiTuongTienAnId;
    private String _toaAnXuPhat;
    private Date _ngayToaAn;
    private String _toiDanh;
    private Date _ngayPhamToi;
    private boolean _xoaAnTich;
    private String _chuThich;
    private String _hinhPhatChinh;
    private String _hinhPhatBoSung;
    private String _nghiaVuDanSu;
    private String _anPhi;
    private String _banAnSo;
    private String _moTaTienAn;
    private long _columnBitmask;
    private TienAn _escapedModel;

    public TienAnModelImpl() {
    }

    @Override
    public long getPrimaryKey() {
        return _tienAnId;
    }

    @Override
    public void setPrimaryKey(long primaryKey) {
        setTienAnId(primaryKey);
    }

    @Override
    public Serializable getPrimaryKeyObj() {
        return _tienAnId;
    }

    @Override
    public void setPrimaryKeyObj(Serializable primaryKeyObj) {
        setPrimaryKey(((Long) primaryKeyObj).longValue());
    }

    @Override
    public Class<?> getModelClass() {
        return TienAn.class;
    }

    @Override
    public String getModelClassName() {
        return TienAn.class.getName();
    }

    @Override
    public Map<String, Object> getModelAttributes() {
        Map<String, Object> attributes = new HashMap<String, Object>();

        attributes.put("tienAnId", getTienAnId());
        attributes.put("userId", getUserId());
        attributes.put("userName", getUserName());
        attributes.put("createDate", getCreateDate());
        attributes.put("modifiedDate", getModifiedDate());
        attributes.put("doiTuongTienAnId", getDoiTuongTienAnId());
        attributes.put("toaAnXuPhat", getToaAnXuPhat());
        attributes.put("ngayToaAn", getNgayToaAn());
        attributes.put("toiDanh", getToiDanh());
        attributes.put("ngayPhamToi", getNgayPhamToi());
        attributes.put("xoaAnTich", getXoaAnTich());
        attributes.put("chuThich", getChuThich());
        attributes.put("hinhPhatChinh", getHinhPhatChinh());
        attributes.put("hinhPhatBoSung", getHinhPhatBoSung());
        attributes.put("nghiaVuDanSu", getNghiaVuDanSu());
        attributes.put("anPhi", getAnPhi());
        attributes.put("banAnSo", getBanAnSo());
        attributes.put("moTaTienAn", getMoTaTienAn());

        return attributes;
    }

    @Override
    public void setModelAttributes(Map<String, Object> attributes) {
        Long tienAnId = (Long) attributes.get("tienAnId");

        if (tienAnId != null) {
            setTienAnId(tienAnId);
        }

        Long userId = (Long) attributes.get("userId");

        if (userId != null) {
            setUserId(userId);
        }

        String userName = (String) attributes.get("userName");

        if (userName != null) {
            setUserName(userName);
        }

        Date createDate = (Date) attributes.get("createDate");

        if (createDate != null) {
            setCreateDate(createDate);
        }

        Date modifiedDate = (Date) attributes.get("modifiedDate");

        if (modifiedDate != null) {
            setModifiedDate(modifiedDate);
        }

        Long doiTuongTienAnId = (Long) attributes.get("doiTuongTienAnId");

        if (doiTuongTienAnId != null) {
            setDoiTuongTienAnId(doiTuongTienAnId);
        }

        String toaAnXuPhat = (String) attributes.get("toaAnXuPhat");

        if (toaAnXuPhat != null) {
            setToaAnXuPhat(toaAnXuPhat);
        }

        Date ngayToaAn = (Date) attributes.get("ngayToaAn");

        if (ngayToaAn != null) {
            setNgayToaAn(ngayToaAn);
        }

        String toiDanh = (String) attributes.get("toiDanh");

        if (toiDanh != null) {
            setToiDanh(toiDanh);
        }

        Date ngayPhamToi = (Date) attributes.get("ngayPhamToi");

        if (ngayPhamToi != null) {
            setNgayPhamToi(ngayPhamToi);
        }

        Boolean xoaAnTich = (Boolean) attributes.get("xoaAnTich");

        if (xoaAnTich != null) {
            setXoaAnTich(xoaAnTich);
        }

        String chuThich = (String) attributes.get("chuThich");

        if (chuThich != null) {
            setChuThich(chuThich);
        }

        String hinhPhatChinh = (String) attributes.get("hinhPhatChinh");

        if (hinhPhatChinh != null) {
            setHinhPhatChinh(hinhPhatChinh);
        }

        String hinhPhatBoSung = (String) attributes.get("hinhPhatBoSung");

        if (hinhPhatBoSung != null) {
            setHinhPhatBoSung(hinhPhatBoSung);
        }

        String nghiaVuDanSu = (String) attributes.get("nghiaVuDanSu");

        if (nghiaVuDanSu != null) {
            setNghiaVuDanSu(nghiaVuDanSu);
        }

        String anPhi = (String) attributes.get("anPhi");

        if (anPhi != null) {
            setAnPhi(anPhi);
        }

        String banAnSo = (String) attributes.get("banAnSo");

        if (banAnSo != null) {
            setBanAnSo(banAnSo);
        }

        String moTaTienAn = (String) attributes.get("moTaTienAn");

        if (moTaTienAn != null) {
            setMoTaTienAn(moTaTienAn);
        }
    }

    @Override
    public long getTienAnId() {
        return _tienAnId;
    }

    @Override
    public void setTienAnId(long tienAnId) {
        _tienAnId = tienAnId;
    }

    @Override
    public long getUserId() {
        return _userId;
    }

    @Override
    public void setUserId(long userId) {
        _userId = userId;
    }

    @Override
    public String getUserUuid() throws SystemException {
        return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
    }

    @Override
    public void setUserUuid(String userUuid) {
        _userUuid = userUuid;
    }

    @Override
    public String getUserName() {
        if (_userName == null) {
            return StringPool.BLANK;
        } else {
            return _userName;
        }
    }

    @Override
    public void setUserName(String userName) {
        _userName = userName;
    }

    @Override
    public Date getCreateDate() {
        return _createDate;
    }

    @Override
    public void setCreateDate(Date createDate) {
        _createDate = createDate;
    }

    @Override
    public Date getModifiedDate() {
        return _modifiedDate;
    }

    @Override
    public void setModifiedDate(Date modifiedDate) {
        _modifiedDate = modifiedDate;
    }

    @Override
    public long getDoiTuongTienAnId() {
        return _doiTuongTienAnId;
    }

    @Override
    public void setDoiTuongTienAnId(long doiTuongTienAnId) {
        _columnBitmask |= DOITUONGTIENANID_COLUMN_BITMASK;

        if (!_setOriginalDoiTuongTienAnId) {
            _setOriginalDoiTuongTienAnId = true;

            _originalDoiTuongTienAnId = _doiTuongTienAnId;
        }

        _doiTuongTienAnId = doiTuongTienAnId;
    }

    public long getOriginalDoiTuongTienAnId() {
        return _originalDoiTuongTienAnId;
    }

    @Override
    public String getToaAnXuPhat() {
        if (_toaAnXuPhat == null) {
            return StringPool.BLANK;
        } else {
            return _toaAnXuPhat;
        }
    }

    @Override
    public void setToaAnXuPhat(String toaAnXuPhat) {
        _toaAnXuPhat = toaAnXuPhat;
    }

    @Override
    public Date getNgayToaAn() {
        return _ngayToaAn;
    }

    @Override
    public void setNgayToaAn(Date ngayToaAn) {
        _columnBitmask = -1L;

        _ngayToaAn = ngayToaAn;
    }

    @Override
    public String getToiDanh() {
        if (_toiDanh == null) {
            return StringPool.BLANK;
        } else {
            return _toiDanh;
        }
    }

    @Override
    public void setToiDanh(String toiDanh) {
        _toiDanh = toiDanh;
    }

    @Override
    public Date getNgayPhamToi() {
        return _ngayPhamToi;
    }

    @Override
    public void setNgayPhamToi(Date ngayPhamToi) {
        _ngayPhamToi = ngayPhamToi;
    }

    @Override
    public boolean getXoaAnTich() {
        return _xoaAnTich;
    }

    @Override
    public boolean isXoaAnTich() {
        return _xoaAnTich;
    }

    @Override
    public void setXoaAnTich(boolean xoaAnTich) {
        _xoaAnTich = xoaAnTich;
    }

    @Override
    public String getChuThich() {
        if (_chuThich == null) {
            return StringPool.BLANK;
        } else {
            return _chuThich;
        }
    }

    @Override
    public void setChuThich(String chuThich) {
        _chuThich = chuThich;
    }

    @Override
    public String getHinhPhatChinh() {
        if (_hinhPhatChinh == null) {
            return StringPool.BLANK;
        } else {
            return _hinhPhatChinh;
        }
    }

    @Override
    public void setHinhPhatChinh(String hinhPhatChinh) {
        _hinhPhatChinh = hinhPhatChinh;
    }

    @Override
    public String getHinhPhatBoSung() {
        if (_hinhPhatBoSung == null) {
            return StringPool.BLANK;
        } else {
            return _hinhPhatBoSung;
        }
    }

    @Override
    public void setHinhPhatBoSung(String hinhPhatBoSung) {
        _hinhPhatBoSung = hinhPhatBoSung;
    }

    @Override
    public String getNghiaVuDanSu() {
        if (_nghiaVuDanSu == null) {
            return StringPool.BLANK;
        } else {
            return _nghiaVuDanSu;
        }
    }

    @Override
    public void setNghiaVuDanSu(String nghiaVuDanSu) {
        _nghiaVuDanSu = nghiaVuDanSu;
    }

    @Override
    public String getAnPhi() {
        if (_anPhi == null) {
            return StringPool.BLANK;
        } else {
            return _anPhi;
        }
    }

    @Override
    public void setAnPhi(String anPhi) {
        _anPhi = anPhi;
    }

    @Override
    public String getBanAnSo() {
        if (_banAnSo == null) {
            return StringPool.BLANK;
        } else {
            return _banAnSo;
        }
    }

    @Override
    public void setBanAnSo(String banAnSo) {
        _banAnSo = banAnSo;
    }

    @Override
    public String getMoTaTienAn() {
        if (_moTaTienAn == null) {
            return StringPool.BLANK;
        } else {
            return _moTaTienAn;
        }
    }

    @Override
    public void setMoTaTienAn(String moTaTienAn) {
        _moTaTienAn = moTaTienAn;
    }

    public long getColumnBitmask() {
        return _columnBitmask;
    }

    @Override
    public ExpandoBridge getExpandoBridge() {
        return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
            TienAn.class.getName(), getPrimaryKey());
    }

    @Override
    public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
        ExpandoBridge expandoBridge = getExpandoBridge();

        expandoBridge.setAttributes(serviceContext);
    }

    @Override
    public TienAn toEscapedModel() {
        if (_escapedModel == null) {
            _escapedModel = (TienAn) ProxyUtil.newProxyInstance(_classLoader,
                    _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
        }

        return _escapedModel;
    }

    @Override
    public Object clone() {
        TienAnImpl tienAnImpl = new TienAnImpl();

        tienAnImpl.setTienAnId(getTienAnId());
        tienAnImpl.setUserId(getUserId());
        tienAnImpl.setUserName(getUserName());
        tienAnImpl.setCreateDate(getCreateDate());
        tienAnImpl.setModifiedDate(getModifiedDate());
        tienAnImpl.setDoiTuongTienAnId(getDoiTuongTienAnId());
        tienAnImpl.setToaAnXuPhat(getToaAnXuPhat());
        tienAnImpl.setNgayToaAn(getNgayToaAn());
        tienAnImpl.setToiDanh(getToiDanh());
        tienAnImpl.setNgayPhamToi(getNgayPhamToi());
        tienAnImpl.setXoaAnTich(getXoaAnTich());
        tienAnImpl.setChuThich(getChuThich());
        tienAnImpl.setHinhPhatChinh(getHinhPhatChinh());
        tienAnImpl.setHinhPhatBoSung(getHinhPhatBoSung());
        tienAnImpl.setNghiaVuDanSu(getNghiaVuDanSu());
        tienAnImpl.setAnPhi(getAnPhi());
        tienAnImpl.setBanAnSo(getBanAnSo());
        tienAnImpl.setMoTaTienAn(getMoTaTienAn());

        tienAnImpl.resetOriginalValues();

        return tienAnImpl;
    }

    @Override
    public int compareTo(TienAn tienAn) {
        int value = 0;

        value = DateUtil.compareTo(getNgayToaAn(), tienAn.getNgayToaAn());

        value = value * -1;

        if (value != 0) {
            return value;
        }

        return 0;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (!(obj instanceof TienAn)) {
            return false;
        }

        TienAn tienAn = (TienAn) obj;

        long primaryKey = tienAn.getPrimaryKey();

        if (getPrimaryKey() == primaryKey) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return (int) getPrimaryKey();
    }

    @Override
    public void resetOriginalValues() {
        TienAnModelImpl tienAnModelImpl = this;

        tienAnModelImpl._originalDoiTuongTienAnId = tienAnModelImpl._doiTuongTienAnId;

        tienAnModelImpl._setOriginalDoiTuongTienAnId = false;

        tienAnModelImpl._columnBitmask = 0;
    }

    @Override
    public CacheModel<TienAn> toCacheModel() {
        TienAnCacheModel tienAnCacheModel = new TienAnCacheModel();

        tienAnCacheModel.tienAnId = getTienAnId();

        tienAnCacheModel.userId = getUserId();

        tienAnCacheModel.userName = getUserName();

        String userName = tienAnCacheModel.userName;

        if ((userName != null) && (userName.length() == 0)) {
            tienAnCacheModel.userName = null;
        }

        Date createDate = getCreateDate();

        if (createDate != null) {
            tienAnCacheModel.createDate = createDate.getTime();
        } else {
            tienAnCacheModel.createDate = Long.MIN_VALUE;
        }

        Date modifiedDate = getModifiedDate();

        if (modifiedDate != null) {
            tienAnCacheModel.modifiedDate = modifiedDate.getTime();
        } else {
            tienAnCacheModel.modifiedDate = Long.MIN_VALUE;
        }

        tienAnCacheModel.doiTuongTienAnId = getDoiTuongTienAnId();

        tienAnCacheModel.toaAnXuPhat = getToaAnXuPhat();

        String toaAnXuPhat = tienAnCacheModel.toaAnXuPhat;

        if ((toaAnXuPhat != null) && (toaAnXuPhat.length() == 0)) {
            tienAnCacheModel.toaAnXuPhat = null;
        }

        Date ngayToaAn = getNgayToaAn();

        if (ngayToaAn != null) {
            tienAnCacheModel.ngayToaAn = ngayToaAn.getTime();
        } else {
            tienAnCacheModel.ngayToaAn = Long.MIN_VALUE;
        }

        tienAnCacheModel.toiDanh = getToiDanh();

        String toiDanh = tienAnCacheModel.toiDanh;

        if ((toiDanh != null) && (toiDanh.length() == 0)) {
            tienAnCacheModel.toiDanh = null;
        }

        Date ngayPhamToi = getNgayPhamToi();

        if (ngayPhamToi != null) {
            tienAnCacheModel.ngayPhamToi = ngayPhamToi.getTime();
        } else {
            tienAnCacheModel.ngayPhamToi = Long.MIN_VALUE;
        }

        tienAnCacheModel.xoaAnTich = getXoaAnTich();

        tienAnCacheModel.chuThich = getChuThich();

        String chuThich = tienAnCacheModel.chuThich;

        if ((chuThich != null) && (chuThich.length() == 0)) {
            tienAnCacheModel.chuThich = null;
        }

        tienAnCacheModel.hinhPhatChinh = getHinhPhatChinh();

        String hinhPhatChinh = tienAnCacheModel.hinhPhatChinh;

        if ((hinhPhatChinh != null) && (hinhPhatChinh.length() == 0)) {
            tienAnCacheModel.hinhPhatChinh = null;
        }

        tienAnCacheModel.hinhPhatBoSung = getHinhPhatBoSung();

        String hinhPhatBoSung = tienAnCacheModel.hinhPhatBoSung;

        if ((hinhPhatBoSung != null) && (hinhPhatBoSung.length() == 0)) {
            tienAnCacheModel.hinhPhatBoSung = null;
        }

        tienAnCacheModel.nghiaVuDanSu = getNghiaVuDanSu();

        String nghiaVuDanSu = tienAnCacheModel.nghiaVuDanSu;

        if ((nghiaVuDanSu != null) && (nghiaVuDanSu.length() == 0)) {
            tienAnCacheModel.nghiaVuDanSu = null;
        }

        tienAnCacheModel.anPhi = getAnPhi();

        String anPhi = tienAnCacheModel.anPhi;

        if ((anPhi != null) && (anPhi.length() == 0)) {
            tienAnCacheModel.anPhi = null;
        }

        tienAnCacheModel.banAnSo = getBanAnSo();

        String banAnSo = tienAnCacheModel.banAnSo;

        if ((banAnSo != null) && (banAnSo.length() == 0)) {
            tienAnCacheModel.banAnSo = null;
        }

        tienAnCacheModel.moTaTienAn = getMoTaTienAn();

        String moTaTienAn = tienAnCacheModel.moTaTienAn;

        if ((moTaTienAn != null) && (moTaTienAn.length() == 0)) {
            tienAnCacheModel.moTaTienAn = null;
        }

        return tienAnCacheModel;
    }

    @Override
    public String toString() {
        StringBundler sb = new StringBundler(37);

        sb.append("{tienAnId=");
        sb.append(getTienAnId());
        sb.append(", userId=");
        sb.append(getUserId());
        sb.append(", userName=");
        sb.append(getUserName());
        sb.append(", createDate=");
        sb.append(getCreateDate());
        sb.append(", modifiedDate=");
        sb.append(getModifiedDate());
        sb.append(", doiTuongTienAnId=");
        sb.append(getDoiTuongTienAnId());
        sb.append(", toaAnXuPhat=");
        sb.append(getToaAnXuPhat());
        sb.append(", ngayToaAn=");
        sb.append(getNgayToaAn());
        sb.append(", toiDanh=");
        sb.append(getToiDanh());
        sb.append(", ngayPhamToi=");
        sb.append(getNgayPhamToi());
        sb.append(", xoaAnTich=");
        sb.append(getXoaAnTich());
        sb.append(", chuThich=");
        sb.append(getChuThich());
        sb.append(", hinhPhatChinh=");
        sb.append(getHinhPhatChinh());
        sb.append(", hinhPhatBoSung=");
        sb.append(getHinhPhatBoSung());
        sb.append(", nghiaVuDanSu=");
        sb.append(getNghiaVuDanSu());
        sb.append(", anPhi=");
        sb.append(getAnPhi());
        sb.append(", banAnSo=");
        sb.append(getBanAnSo());
        sb.append(", moTaTienAn=");
        sb.append(getMoTaTienAn());
        sb.append("}");

        return sb.toString();
    }

    @Override
    public String toXmlString() {
        StringBundler sb = new StringBundler(58);

        sb.append("<model><model-name>");
        sb.append("qldc.pm.tienan.model.TienAn");
        sb.append("</model-name>");

        sb.append(
            "<column><column-name>tienAnId</column-name><column-value><![CDATA[");
        sb.append(getTienAnId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>userId</column-name><column-value><![CDATA[");
        sb.append(getUserId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>userName</column-name><column-value><![CDATA[");
        sb.append(getUserName());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>createDate</column-name><column-value><![CDATA[");
        sb.append(getCreateDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
        sb.append(getModifiedDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>doiTuongTienAnId</column-name><column-value><![CDATA[");
        sb.append(getDoiTuongTienAnId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>toaAnXuPhat</column-name><column-value><![CDATA[");
        sb.append(getToaAnXuPhat());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayToaAn</column-name><column-value><![CDATA[");
        sb.append(getNgayToaAn());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>toiDanh</column-name><column-value><![CDATA[");
        sb.append(getToiDanh());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayPhamToi</column-name><column-value><![CDATA[");
        sb.append(getNgayPhamToi());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>xoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>chuThich</column-name><column-value><![CDATA[");
        sb.append(getChuThich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>hinhPhatChinh</column-name><column-value><![CDATA[");
        sb.append(getHinhPhatChinh());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>hinhPhatBoSung</column-name><column-value><![CDATA[");
        sb.append(getHinhPhatBoSung());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>nghiaVuDanSu</column-name><column-value><![CDATA[");
        sb.append(getNghiaVuDanSu());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>anPhi</column-name><column-value><![CDATA[");
        sb.append(getAnPhi());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>banAnSo</column-name><column-value><![CDATA[");
        sb.append(getBanAnSo());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>moTaTienAn</column-name><column-value><![CDATA[");
        sb.append(getMoTaTienAn());
        sb.append("]]></column-value></column>");

        sb.append("</model>");

        return sb.toString();
    }
}
